import { request } from '../utils/request';

export function getPagingTopic(data) {
  return request({
    url: '/topic/getPagingTopic',
    method: 'post',
    data,
  });
}
export function getTopicTypes() {
  return request({
    url: '/topic/getTopicTypes',
    method: 'get',
  });
}
export function getTopicById(id) {
  return request({
    url: '/topic/getTopicById?topic_id=' + id,
    method: 'get',
  });
}
export function createTopic(data) {
  return request({
    url: '/topic/postTopic',
    method: 'post',
    data,
  });
}
export function modifyTopic(data) {
  return request({
    url: '/topic/modifyTopic',
    method: 'post',
    data,
  });
}
export function delTopic(topic_id) {
  return request({
    url: '/topic/delTopic?topic_id=' + topic_id,
    method: 'get',
  });
}
export function delComment(id) {
  return request({
    url: '/topic/delComment?id=' + id,
    method: 'get',
  });
}
export function postComment(data) {
  return request({
    url: '/topic/postComment',
    method: 'post',
    data,
  });
}
export function pagingTopic(data) {
  return request({
    url: '/topic/pagingTopic',
    method: 'post',
    data,
  });
}
export function pagingType(data) {
  return request({
    url: '/topic/pagingType',
    method: 'post',
    data,
  });
}
export function getTypeById(id) {
  return request({
    url: '/topic/getTypeById?id=' + id,
    method: 'get',
  });
}

